package com.envper.common.mapper;

import com.envper.common.domain.dto.DeviceDto;
import com.envper.common.domain.dto.DeviceLogDto;
import com.envper.common.domain.dto.DeviceThresholdDto;
import com.envper.mysql.domain.entity.TDevice;
import com.envper.mysql.domain.entity.TDeviceLog;
import com.envper.mysql.domain.entity.TDeviceThreshold;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface DeviceMapper {
    DeviceMapper INSTANCE = Mappers.getMapper(DeviceMapper.class);

    DeviceDto toDeviceDto(TDevice tDevice);

    TDevice toTDevice(DeviceDto deviceDto);

    List<DeviceDto> toDeviceDtoList(List<TDevice> tDeviceList);

    List<DeviceLogDto> toDeviceLogDtoList(List<TDeviceLog> tDeviceLogList);

    List<DeviceThresholdDto> toDeviceThresholdDtoList(List<TDeviceThreshold> tDeviceThresholdList);

    TDeviceThreshold toTDeviceThreshold(DeviceThresholdDto deviceThresholdDto);
}
